package com.hd.sup.modules.alarm.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hd.sup.core.annotation.DataScope;
import com.hd.sup.modules.alarm.model.AlarmDetail;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hd.sup.modules.vehicle.model.VehicleAlarmDailyStatis;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 报警明细表 Mapper 接口
 * </p>
 *
 * @author chentl123
 * @since 2020-12-28
 */
public interface AlarmDetailMapper extends BaseMapper<AlarmDetail> {
    /**
     * @return java.util.List<java.util.Map < java.lang.String, java.lang.Object>>
     * @author chentl
     * @description 报警查询分页列表
     * @date 2020/12/31 2:20 下午
     * @params [page, alarmDetail]
     */
    @DataScope
    List<Map<String, Object>> getAlarmPage(@Param("page") Page page, @Param("alarmDetail") AlarmDetail alarmDetail);

    /**
     * @return java.util.Map < java.lang.String, java.lang.Object>
     * @author chentl
     * @description 获取报警数量分布
     * @date 2021/2/22 3:59 下午
     * @params [param]
     */
    Map<String, Object> getAlarmSumDistribution(@Param("param") VehicleAlarmDailyStatis param);

    /**
     * @return void
     * @author chentl
     * @description 刷新或新增报警数据
     * @date 2021/1/20 1:40 下午
     * @params [alarmDetail]
     */
    void refreshAlarmDetailData(@Param("alarmDetail") AlarmDetail alarmDetail);
}
